package ar.com.vates.cuentas;

import ar.com.vates.clientes.Titular;

public class CuentaAhorro extends CuentaCorriente {

	private double interes;

	public CuentaAhorro(Titular t, String nroCta, double saldo, double interes) {
		super(t, nroCta, saldo);
		this.interes = interes;
	}
	
	public CuentaAhorro(Titular t, String nroCta, double interes){
		super(t, nroCta,0);
		this.interes = interes;
	}
	
	public CuentaAhorro(Titular t, String nroCta)
	{
		super(t,nroCta,0);
		this.interes = 2.5;
	}

	public double getInteres() {
		return interes;
	}

	public void setInteres(double interes) {
		this.interes = interes;
	}
	
	public void incrementarInteres(){
		double saldo = super.getSaldo();
		if(saldo>0)
		{
			saldo += saldo*this.interes;
			super.setSaldo(saldo);
		}
		else
			System.out.println("el saldo es 0");
	}
}
